
** Table A2
********************************************************************************
* Regression Analysis
********************************************************************************
use "$OUTDATA/NFHS_sample.dta", clear 


* Outcomes

global dec " w_dec n_w_dec sayl hcdec huss saysc "
global viol " injuries n_inj viol_p2 viol_p1 viol_s viol_e "

global marriage "age_marr age_gap educ_gap height_diff workh h_goodjob h_earnless drunk_often"
global wealth "asset1 asset2 modern_cook modern_roof agrland_hec wealth_index sl_index "
global hc "educw primary height lowheight"
global reporting "viol_byothers viol_natal told_anyone sought_help1 sought_help2 sought_help3"

* Covariates and FE
global cov "rural christian hindu scstbc"
global cov1 "wealth_index hhsize educw"
global cov2 "ageh educh workw workh"
global fe1   "i.state i.yy_1marr"
global fe2   "i.state i.yearb"
global did "i.dow_cohort##i.hindu1"

global cluster "state"

global graph "ylabel(, nogrid) scheme(s2mono) plotregion(fcolor(white) lcolor(white) margin(small)) graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white))"


* Labels for Tables

label var w_dec "\shortstack{Any \\ Decision}"
label var n_w_dec "\shortstack{No. of \\ Decisions}"
label var sayl "\shortstack{Household \\ Purchases}"
label var hcdec "\shortstack{Health \& \\ Contracept.}"
label var huss "\shortstack{Husband's \\ Money}"
label var saysc "\shortstack{Daily \\ Decisions}"

label var injuries "\shortstack{Any \\ Injury}"
label var n_inj "\shortstack{No. of \\ Injuries}"
label var viol_p2 "\shortstack{Severe \\ Violence}"
label var viol_p1 "\shortstack{Less Severe \\ Violence}"
label var viol_s "\shortstack{Sexual \\ Violence}"
label var viol_e "\shortstack{Emotional \\ Violence}"

label var age_marr "\shortstack{Age at \\ Marriage}"
label var age_gap "\shortstack{Spousal \\ Age Gap}"
label var educ_gap "\shortstack{Spousal \\ Educ. Gap}" 
label var height_diff "\shortstack{Absolute \\ Height Gap}" 
label var workh "\shortstack{Husband \\ Employed}" 
label var h_goodjob "\shortstack{Husband \\ White Collar \\ Job}"   
label var h_earnless "\shortstack{Husband \\Earns Less \\ or Same}" 
label var drunk_often "\shortstack{Husband \\Often Drunk}"

label var educw "\shortstack{Years of \\ Schooling}"
label var primary "\shortstack{Primary \\ School}"
label var height "\shortstack{Height \\(cm)}"
label var lowheight "\shortstack{Low \\ Height}"

label var viol_byothers "\shortstack{Viol. \\ by Others}"
label var viol_natal "\shortstack{Viol. in \\ Natal Family}"
label var told_anyone "\shortstack{Has Told \\ Anyone }"
label var sought_help1 "\shortstack{Help \\ From Family}"
label var sought_help2 "\shortstack{Help From \\ Friends \& \\ Network}"
label var sought_help3 "\shortstack{Help From \\ Police\/Doctor}"

label var scstbc "SC/ST/OBC"
label var rural "Rural"
label var muslim "Muslim"
label var christian "Christian"
label var hindu "Hindu"
label var wealth_index "Wealth Index"
label var hhsize "Household Size"
label var workw "Employed in Past 12 Months"
label var nkids "No. Kids"
label var nkids_home "No. Kids at Home"
label var nomorec "Completed Fertility"
label var kids_home "Kids at Home"



* Heterogeneity in social stigma


eststo clear

label var w_dec "\shortstack{Any \\ Decision}"
label var injuries "\shortstack{Any \\ Injury}"

cap drop high_divsep
cap sum divsep_psu, d
cap gen high_divsep = (divsep_psu >r(p50))
cap label var high_divsep "High Divorce Rate"

cap gen urban = rural == 0
cap label var urban "Urban"



sum num_female_head_hh, d
gen above_med_num_female_head = num_female_head_hh>r(p50)


// Jaychandran-Pande Matrilineal definition
gen matril_region = (state == 33 | state == 12 | state == 14 | state == 17 | state == 15  | state == 13 | state == 16)
// Kerala and Northeast include Arunachal Pradesh, Assam, Kerala, Manipur, Meghalaya, Mizoram, Nagaland, Sikkim, and Tripura

// Patriarchy Index (Singh et al)

*1 Female heads
gen femalehhh = v150 == 1 & v151 == 2
*2 Young brides
gen youngbride = (age_marr<20)
*3 Older wives
gen olderwife =  (agew>ageh)

*4 Younger household head (HHH)
forvalues i = 1(1)9 {
	rename hv104_0`i' hv104_`i'
	rename hv105_0`i' hv105_`i'
	rename ha60_0`i' ha60_`i'
}
forvalues i = 3(1)35 {
	gen oldman_nohhh_`i' = hv104_`i' == 1 & hv105_`i' >= 60 & hv105_`i' != . 
}
egen n_oldmen_nohhh = rowtotal(oldman_nohhh_3-oldman_nohhh_35)
gen oldman_nohhh = n_oldmen_nohhh >0

*5 Neo-local
gen youngmalehhh = v150 == 1 & v151 == 1 & v152>=20 & v152<30 & oldman_nohhh == 1

*6 Joint family
gen jointfam = v150>3

* Boy as last child
gen lastchildisboy = bidx_01 == 1 & b4_01 == 1

* Son-preference
gen moreboys = (v627>v628)

* Educated wives
gen moreeduc_w = educw>educh

* Economic domination
gen morework_w = workw>workh

pca femalehhh youngbride olderwife oldman_nohhh youngmalehhh jointfam lastchildisboy moreboys moreeduc_w morework_w, comp(1) 
predict f1 
rename f1 fpc_patriarchy
sum fpc_patriarchy 
replace fpc_patriarchy = (fpc_patriarchy - r(min))/(r(max)-r(min)) 

bysort psu: egen patriarchy_psu = mean(fpc_patriarchy)

cap drop high_patriarchy
sum patriarchy_psu, d
gen high_patriarchy = (patriarchy_psu >r(p50))
label var high_patriarchy "High Patriarchy"




foreach y in w_dec injuries {
	
	eststo: reg `y' i.dowTreat##i.urban  dow_cohort hindu1 $cov $fe2 [pweight = v005] , r cl($cluster )
	qui sum `y' if e(sample)
	estadd scalar m =r(mean)
	
	eststo: reg `y'  i.dowTreat##i.east i.dowTreat##i.west  i.dowTreat##i.south i.dowTreat##i.northeast dow_cohort hindu1 $cov $fe2 [pweight = v005] , r cl($cluster )
	qui sum `y' if e(sample)
	estadd scalar m =r(mean)
	
	eststo: reg `y' i.dowTreat##i.high_divsep  dow_cohort hindu1 $cov $fe2 [pweight = v005] , r cl($cluster )
	qui sum `y' if e(sample)
	estadd scalar m =r(mean)
	
	eststo: reg `y' i.dowTreat##i.high_patriarchy  dow_cohort hindu1 $cov $fe2 [pweight = v005] , r cl($cluster )
	qui sum `y' if e(sample)
	estadd scalar m =r(mean)
	
	}
	 
esttab using "$OUTDIR/NFHS3_stigma.tex", ///
booktabs nonotes replace indicate("\hline\vspace{-3mm} \\ \vspace{-3mm}  Individual Controls = $cov " " \vspace{-3mm} State FE = *.state " " Year of Birth FE = *.yearb ", labels("Yes" "$-$") ) ///
keep(1.dowTreat 1.dowTreat#1.urban 1.dowTreat#1.northeast 1.dowTreat#1.south 1.dowTreat#1.west 1.dowTreat#1.east  1.dowTreat#1.high_divsep  1.dowTreat#1.high_patriarchy) ///
label interaction(" \$\times\$ ") substitute("=1" "") ///
stats(N r2 m, labels("Obs." "R sq." "Mean Dep. Var.") fmt(%9.0fc %9.3fc))   ///
se star(* 0.10 ** 0.05 *** 0.01)  b(%9.3fc) se(%9.3fc) 




